#!/bin/bash

function main() {
  #ch1_nfs
  ch2_elastic
  ch3_kibana
  ch4_kafka_zookeeper
  ch5_filebeat
  ch6_logstash
  ch7_fluentd
}

function ch2_elastic() {
  cd ch2_elastic
  kubectl delete -f .
  cd ..
}

function ch3_kibana() {
  cd ch3_kibana
  kubectl delete -f .
  cd ..
}

function ch4_kafka_zookeeper() {
   cd  ch4_kafka_zookeeper
   cd  ch4_1_zookeeper
   kubectl delete -f .
   cd ../ch4_2_kafka
   kubectl delete -f .
   cd ../..
}

function ch5_filebeat() {
  cd ch5_filebeat
  kubectl delete -f .
  cd ..
}

function ch6_logstash() {
  cd ch6_logstash
  kubectl delete -f .
  cd ..
}

function ch7_fluentd() {
  cd ch7_fluentd
  kubectl delete -f .
  cd ..
}

main